#ifndef SCOPED_LOGGER_H
#define SCOPED_LOGGER_H
#include "logger.h"

namespace vpm 
{
	namespace logger 
	{
		class ScopedLogger
		{
		public:
			ScopedLogger(Logger & logger):m_logger(logger)
			{

			}

			std::ostream& operator() 
			{
				return m_logger
			}
			std::ostream & stack()
			{
				return m_logger.stack();
			}

			std::ostream & debug()
			{
				return m_logger.debug();
			}

			std::ostream & info()
			{
				return m_logger.info();
			}

			std::ostream & warn()
			{
				return m_logger.warn();					
			}

			std::ostream & error()
			{
				return m_logger.error();
			}

			std::ostream & fatal()
			{
				return m_logger.fatal();
			}

			~ScopedLogger()
			{
				m_logger.flush();
			}

		private:
			Logger & m_logger; 
		};
	}
}

#endif // 
